home *** CD-ROM | disk | FTP | other *** search
/ Celestin Apprentice 2 / Apprentice-Release2.iso / Source Code / C / Snippets / FindIcon / Is_suite_empty.c < prev    next >
Encoding:
C/C++ Source or Header  |  1993-07-16  |  588 b   |  27 lines  |  [TEXT/KAHL]

  1. #include "Is_suite_empty.h"
  2.  
  3. /*    ------------------------------------------------------------------
  4.     Is_suite_empty        Test whether an icon suite has any icons.
  5.     ------------------------------------------------------------------
  6. */
  7. static pascal OSErr Test_handle( ResType theType, Handle *theIcon,
  8.             void *yourDataPtr )
  9. {
  10.     if (*theIcon != NULL)
  11.         *(Boolean *)yourDataPtr = false;    // not empty!
  12.     
  13.     return noErr;
  14. }
  15.  
  16. Boolean        Is_suite_empty( Handle the_suite )
  17. {
  18.     Boolean        retval;
  19.     
  20.     retval = true;
  21.     ForEachIconDo( the_suite, svAllAvailableData, Test_handle, &retval );
  22.     
  23.     return retval;
  24. }
  25.  
  26.  
  27.